package com.c1g19.service.illness;

import com.c1g19.dao.illness.CaseDao;

import java.util.List;
import java.util.Map;

/**
 * Case类的service层
 * Created by Mr_C on 2017/3/8.
 */
public class CaseService {

    /**
     * 获得所有主病例
     * @return
     */
    public Map<String, Object> getAll_Main_Case(){
        CaseDao caseDao = new CaseDao();
        Map<String, Object> allMainCaseList = caseDao.getAll_Main_Case();
        return allMainCaseList;
    }

    /**
     * 通过ID获得病例
     * @param main_case_id
     * @param filter
     * @param beginIndex
     * @param pageSize
     * @return
     */
    public Map<String, Object> getCaseWithID(int main_case_id, String filter, int beginIndex, int pageSize){
        CaseDao caseDao = new CaseDao();
        Map<String, Object> case_list = caseDao.getCaseWithID(main_case_id, filter, beginIndex, pageSize);
        return case_list;
    }

    public Map<String, Object> getCaseDetail(int case_id){
        CaseDao caseDao = new CaseDao();
        Map<String, Object> case_list = caseDao.getCaseDetail(case_id);
        return case_list;
    }

    public Map<String, Object> getAllProfession(){
        CaseDao caseDao = new CaseDao();
        Map<String, Object> allProfessionList = caseDao.getAllProfession();
        return allProfessionList;
    }

    public Map<String, Object> getProfessionDetail(int pro_id){
        CaseDao caseDao = new CaseDao();
        Map<String, Object> pro_list = caseDao.getProfessionDetail(pro_id);
        return pro_list;
    }

    public Map<String, Object> getFlowDetail(int flow_id){
        CaseDao caseDao = new CaseDao();
        Map<String, Object> flow_list = caseDao.getFlowDetail(flow_id);
        return flow_list;
    }
}
